package xiegd.com.springbootuse.demo.delay1;

/**
 * @Author: xieguangda
 * @Description:
 * @Date: 2023/9/8 16:31
 */
public class Consumer02 {
    private static final String DEAD_EXCHANGE = "dead_exchange";

//    public static void main(String[] argv) throws Exception {
//        Channel channel = RabbitUtils.getChannel();
//        channel.exchangeDeclare(DEAD_EXCHANGE, BuiltinExchangeType.DIRECT);
//        String deadQueue = "dead-queue";
//        channel.queueDeclare(deadQueue, false, false, false, null);
//        channel.queueBind(deadQueue, DEAD_EXCHANGE, "lisi");
//        System.out.println("等待接收死信队列消息........... ");
//        DeliverCallback deliverCallback = (consumerTag, delivery) -> {
//            String message = new String(delivery.getBody(), "UTF-8");
//            System.out.println("Consumer02 接收死信队列的消息" + message);
//        };
//        channel.basicConsume(deadQueue, true, deliverCallback, consumerTag -> {
//        });
//    }
}
